﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NBFModel;
using System.Collections;
using Hisuntech.SystemFramework.Net.Json;
using System.Data;

public partial class passwordtest_Remind : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        //添加提醒
        //Hashtable ht = new Hashtable();
        //ht.Add("yingli", "11");
        //ht.Add("kuisun", "22");
        //string jjdms = "0001,0022";
        //ht.Add("jjdms", jjdms);
        //ht.Add("userid", Guid.NewGuid().ToString());
        //ht.Add("startday", DateTime.Now.Date.ToString());
        //string lxids = "101,102";
        //ht.Add("lxids", lxids);
        //string txContents = "asdfsdf,009jdjf";
        //ht.Add("txContents", txContents);

        //string url = "http://localhost:9162/RemindService.svc/InsertUpdateGZ";
        //bool reslet = JSONClient.PostData<Hashtable, bool>(url, ht);





        //查看跟踪记录
        //Hashtable ht = new Hashtable();
        //ht.Add("userid", "01");
        //ht.Add("start", "2010-01-01");
        //ht.Add("end", "2010-06-06");
        //ht.Add("productnumber", "123");
        //string url = "http://localhost:9162/TrackRemindService.svc/GetHistoryByID";
        //bool reslet = JSONClient.PostData<Hashtable, bool>(url, ht);


        //提醒记录设置为已阅
        //string guid = "305B56CE-A6E7-4582-8FF9-4568C37B12C2";
        //string url = "http://localhost:9162/TrackRemindService.svc/UpdateIsRead";
        //bool reslet = JSONClient.PostData<string, bool>(url, guid);


        //更新组合提醒
        //string startday, string yingli, string kuisun, string userid, string zdid

        //Hashtable ht = new Hashtable();
        //ht.Add("startday", "2010-12-12");
        //ht.Add("yingli", "12");
        //ht.Add("kuisun", "12");
        //ht.Add("userid", "111");
        //ht.Add("zdid", "111");
        //string url = "http://localhost:9162/RemindService.svc/UpdateGroupFundSetting";
        //bool reslet = JSONClient.PostData<Hashtable, bool>(url, ht);


        //获取单只基金提醒设置
        //Hashtable ht = new Hashtable();
        //ht.Add("startday", "2010-12-12");
        //ht.Add("yingli", "12");
        //string url = "http://localhost:9162/RemindService.svc/getJJSetData";
        //DataTable reslet = JSONClient.PostData<Hashtable, DataTable>(url, ht);

        //根据基金代码、用户编号、提醒类型修改跟踪设置表信息  修改 关注基金  如果是关注基金 先修改 再添加 如果是 单只基金提醒  直接添加
        //(string userid, string jjdm, string yingli, string kuisun, string startDay, string tx_Type, ArrayList txContent, string gzid)
        //Hashtable ht = new Hashtable();
        //ht.Add("userid", "11");
        //ht.Add("jjdm", "89299");
        //ht.Add("yingli", "11");
        //ht.Add("kuisun", "22");
        //ht.Add("startDay", "2010-01-01");
        //ht.Add("tx_Type", "1");
        //ht.Add("txContent", "1,2,3");
        //ht.Add("gzid", "112");

        //string url = "http://localhost:9162/RemindService.svc/UpdateGZByJJDM";
        //bool reslet = JSONClient.PostData<Hashtable, bool>(url, ht);


        //删除单只基金提醒设置详细   删除关注基金提
        //Hashtable ht = new Hashtable();
        //ht.Add("userid", "1");
        //ht.Add("jjdm", "001");
        //string url = "http://localhost:9162/RemindService.svc/DeleteGZByID";
        //bool reslet = JSONClient.PostData<Hashtable, bool>(url, ht);


        //获取跟踪服务信息
        //string userid = "11111223122";
        //string url = "http://localhost:9162/RemindService.svc/GetGZByUserID";
        //DataTable reslet = JSONClient.PostData<string, DataTable>(url, userid);


        ///删除单只基金盈亏提醒设置
        //Hashtable ht = new Hashtable();
        //ht.Add("userid", "1");
        //ht.Add("jjdm", "001");
        //string url = "http://localhost:9162/RemindService.svc/deleteJJSetData";  
        //bool reslet = JSONClient.PostData<Hashtable, bool>(url, ht);


        //咨询管理 先删除后添加
        //Hashtable ht = new Hashtable();
        //ht.Add("ids", "100,101");
        //ht.Add("userid", "111");
        //string url = "http://localhost:9162/RemindService.svc/updateZX";
        //JSONClient.PostData<Hashtable >(url, ht);


        //添加普通提醒
        //TB_zdgl_DayMyself dm = new TB_zdgl_DayMyself();
        //dm.ID = Guid.NewGuid().ToString();
        //dm.AddTime = DateTime.Now.ToString();
        //dm.TxDay = DateTime.Now.ToString();
        //dm.Content = "neirong";
        //dm.Title = "title";
        //dm.Txpl = "1";
        
        //string url = "http://localhost:9162/RemindService.svc/InsertTXSet";
        //bool result = JSONClient.PostData<TB_zdgl_DayMyself,bool>(url, dm);


        //修改普通提醒
        //TB_zdgl_DayMyself dm = new TB_zdgl_DayMyself();
        //dm.ID = "60b7c117-c6f2-4c12-b493-2bcbf48fc05c";
        //dm.AddTime = DateTime.Now.ToString();
        //dm.TxDay = DateTime.Now.ToString();
        //dm.Content = "111111111111111111";
        //dm.Title = "11111111111111";
        //dm.Txpl = "1";

        //string url = "http://localhost:9162/RemindService.svc/UpdateTXSet";
        //bool result = JSONClient.PostData<TB_zdgl_DayMyself, bool>(url, dm);


        //删除普通提醒 批量删除
        //List<string> ids = new List<string>();
        //ids.Add("60b7c117-c6f2-4c12-b493-2bcbf48fc05c");
        //ids.Add("60b7c117-c6f2-4c12-b493-2bcbf48fc05c");
        //string url = "http://localhost:9162/RemindService.svc/DeleteTXSet";
        //bool result = JSONClient.PostData<List<string>, bool>(url, ids);



        Hashtable ht = new Hashtable();
        ht.Add("lxs", "100,101");
        ht.Add("ZuheType", 1);
        ht.Add("userid", "111");
        string url = "http://localhost:9162/RemindService.svc/UpdateZuheJJ";
        JSONClient.PostData<Hashtable>(url, ht);


    }
}
